var t, e = (t = require("@vant/weapp/toast/toast")) && t.__esModule ? t : {
    default: t
};
var  i = require("../../utils/request");
storageData = require("../../utils/storage")
Page({
    data: {   
        actColor:'#6495ED',     
        activeTab: 0,    
        datatableList: [], 
        page: 1,
        pageSize: 10,
        title: "加载更多"
    },
    onShow: function() {
        this.getList(!0);
    },
    goaddCheckCard: function() {
        wx.redirectTo({
            url: "/pages/physicaladd/physicaladd"
        }) 
    },     
    getList: function(t) {       
        var c = this;
        wx.showLoading({
            title: "正在加载中...",
            mask: !0
        }), t && this.setData({
            page: 1,
            pageSize: 10,
            totalSize: 0,
            datatableList: []
        });
        var openid = storageData.getStorageSync(storageData.storageKey.openId);
        var para={
          openid:openid,
          page: 1,
          pageSize: 10
        };          
        i.post1("/wechat/home/getInformationList", para, !0)
        .then(function(i) {
            if(i.code == 1){
                wx.hideLoading(), (null == i.data || i.data.length <= 0) && (c.setData({
                    title: "我是有底线的"
                }), wx.showToast({
                    title: "已无更多数据",
                    duration: 3e3,
                    mask: !1,
                    icon: "none"
                }))
                dataList = c.data.datatableList;
                console.log(i.data)
                i.data.forEach(function(item) {
                    dataList.push(item)
                });
                c.setData({
                    datatableList: dataList
                });
            }else (0, e.default)({
                message: i.message,
                duration: 5e3
            }), wx.hideLoading();
     
         
        });
    },
    onShareAppMessage: function() {
        return {
            title: " 详情",
            path: "/pages/myhoscheck/myhoscheck"
        };
    },
    addMore: function() {
        var t = this.data.page + 1;
        this.setData({
            page: t
        }), this.getList(!1);
    },
    onReload: function() {
        this.getList(!0);
    }
});